package cn.fz.eventdemo01.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Contact;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SwaggerConfig {
    @Bean
    public OpenAPI customOpenAPI() {
        Contact contact = new Contact();
        contact.setName("xxxxxxx部");
        return new OpenAPI()
                .info(new Info()
                        .title("事件驱动测试")
                        .contact(contact)
                        .version("1.0")
                        .description("事件驱动测试测试文档")
                        .termsOfService("http://localhost:8889/doc.html")
                        .license(new License().name("Apache 2.0").url("http://localhost:8889/doc.html")));
    }
}
